package com.zelix;

import java.util.*;

public final class fh
        implements ey, Comparable {

    private static Hashtable a;
    private String b;
    private int c;
    private fh d;
    private mt e;
    private Vector f;
    private Vector g;
    private Vector h;
    private fh i;
    private fh j;
    private Vector k;
    private static String z[];

    private fh(String s1, mt mt1) {
        f = null;
        g = null;
        h = null;
        k = null;
        b = s1;
        e = mt1;
        if (e != null)
            e.a(this);
    }

    final void a(fh fh1) {
        if (h == null)
            h = new Vector(2);
        h.addElement(fh1);
    }

    final void b(fh fh1) {
        if (k == null)
            k = new Vector(2);
        k.addElement(fh1);
    }

    final void c(fh fh1) {
        if (f == null)
            f = new Vector(2);
        f.addElement(fh1);
    }

    final void d(fh fh1) {
        if (g == null)
            g = new Vector(2);
        g.addElement(fh1);
    }

    public final void a(Hashtable hashtable, Hashtable hashtable1) {
        boolean flag = tb.b;
        if (k != null) {
            for (int i1 = 0; i1 < k.size(); i1++) {
                fh fh1 = (fh) k.elementAt(i1);
                mt mt1 = ((fh) k.elementAt(i1)).e;
                fh fh2 = fh1.g();
                if (fh2 != null) {
                    String s1 = fh2.d();
                    mt1.a(s1, (String) hashtable.get(s1), hashtable, hashtable1);
                }
            }
        }
    }

    public int compareTo(Object obj) {
        fh fh1 = (fh) obj;
        return d().compareToIgnoreCase(fh1.d());
    }

    static synchronized fh a(String s1, mt mt1) {
        fh fh1 = (fh) a.get(s1);
        if (fh1 == null) {
            fh1 = new fh(s1, mt1);
            a.put(s1, fh1);
        }
        fh1.a(mt1);
        return fh1;
    }

    public final boolean equals(Object obj) {
        if (obj instanceof fh)
            return b.equals(((fh) obj).b);
        else
            return false;
    }

    final void a(ch ch1, Hashtable hashtable, Hashtable hashtable1) {
        String s1 = ch1.a(this);
        Object obj = hashtable.put(b, s1);
        Object obj1 = hashtable1.put(s1, b);
        lx.c(obj1, z[2] + b + z[1] + s1 + z[1] + obj1 + "'");
    }

    static synchronized void b() {
        Enumeration enumeration;
        boolean flag;
        flag = tb.b;
        enumeration = a.elements();
        while (enumeration.hasMoreElements()) {
            fh fh1 = (fh) enumeration.nextElement();
            fh1.z();
        }
        a = new Hashtable();
    }

    public final mt c() {
        return e;
    }

    public static mt a(String s1) {
        fh fh1 = b(s1);
        if (fh1 == null)
            return null;
        else
            return fh1.c();
    }

    public final String d() {
        return b;
    }

    public static fh b(String s1) {
        return (fh) a.get(s1);
    }

    final fh f() {
        return i;
    }

    public final fh g() {
        return j;
    }

    final Enumeration h() {
        boolean flag = tb.b;
        if (j == null)
            return mx.a();
        HashSet hashset = new HashSet(13);
        ArrayList arraylist = new ArrayList();
        fh fh1 = j;
        do {
            label0:
            {
                String s1;
                label1:
                {
                    arraylist.add(fh1);
                    if (hashset.add(fh1))
                        break label0;
                    if (fh1.w()) {
                        s1 = fh1.c().i();
                        if (!flag)
                            break label1;
                    }
                    s1 = fh1.d();
                }
                lx.b(false, z[0] + s1 + "'");
            }
            fh1 = fh1.g();
            if (fh1 == null)
                return Collections.enumeration(arraylist);
        } while (true);
    }

    final String i() {
        return b.replace('/', '.');
    }

    final Enumeration j() {
        String as[];
        int i1;
        if (g != null) {
            as = new String[g.size()];
            for (i1 = 0; i1 < g.size(); i1++) {

            }
            as[i1] = ((fh) g.elementAt(i1)).d();
        }
        as = new String[0];
        return new cv(as);
    }

    public Enumeration k() {
        if (g != null)
            return g.elements();
        else
            return null;
    }

    final Enumeration l() {
        if (h != null)
            return h.elements();
        else
            return null;
    }

    public final void a(Hashtable hashtable) {
        boolean flag = tb.b;

        if (f == null) {
            for (int i1 = 0; i1 < f.size(); i1++) {
                fh fh1 = (fh) f.elementAt(i1);
                hashtable.put(fh1, fh1);
                fh1.a(hashtable);
            }
        }

        if (h == null) {
            for (int i1 = 0; i1 < h.size(); i1++) {
                fh fh2 = (fh) h.elementAt(i1);
                hashtable.put(fh2, fh2);
                fh2.a(hashtable);
            }
        }
    }

    final void a(Vector vector) {
        fh fh1;
        boolean flag;
        flag = tb.b;
        fh1 = this;
        while (fh1.d != null && fh1.d.e != null) {
            fh1 = fh1.d;
            vector.addElement(fh1);
        }
    }

    final int m() {
        return c;
    }

    final mt n() {
        if (e.E()) {
            if (g == null)
                return d.c();
            else
                return ((fh) g.elementAt(0)).c();
        } else {
            return d.c();
        }
    }

    final String o() {
        if (e.E()) {
            if (g == null)
                return d.d();
            else
                return ((fh) g.elementAt(0)).d();
        } else {
            return d.d();
        }
    }

    final Enumeration p() {
        if (f != null)
            return f.elements();
        else
            return null;
    }

    final mt a() {
        if (d != null)
            return d.c();
        else
            return null;
    }

    public final fh q() {
        return d;
    }

    final void b(Hashtable hashtable) {
        if (g != null) {
            for (int i1 = 0; i1 < g.size(); i1++) {
                fh fh1 = (fh) g.elementAt(i1);
                hashtable.put(fh1, fh1);
                fh1.b(hashtable);
            }
        }
    }

    final boolean r() {
        return j != null;
    }

    public final boolean s() {
        return h != null && h.size() > 0;
    }

    public final boolean t() {
        return f != null && f.size() > 0;
    }

    public final int hashCode() {
        return b.hashCode();
    }

    final boolean u() {
        return i != null;
    }

    public final boolean v() {
        return e.E();
    }

    public final boolean w() {
        return e != null;
    }

    public static boolean c(String s1) {
        fh fh1 = b(s1);
        return fh1 != null && fh1.w();
    }

    final void a(ep ep)
            throws qb, bc {
        boolean flag = tb.b;

        if (f != null) {
            for (int i1 = 0; i1 < f.size(); i1++) {
                fh fh1 = (fh) f.elementAt(i1);
                mt mt1 = fh1.c();
                mt1.a(ep);
                fh1.a(ep);
            }
        }
    }

    static synchronized void x() {
        Enumeration enumeration = a.elements();
        A();
        while (enumeration.hasMoreElements()) {
            fh fh1 = (fh) enumeration.nextElement();
            a.put(fh1.b, fh1);
        }
    }

    public static void a() {
        Enumeration enumeration;
        enumeration = a.elements();
        while (enumeration.hasMoreElements()) {
            fh fh1 = (fh) enumeration.nextElement();
            fh1.i = null;
            fh1.j = null;
            fh1.k = null;
        }
    }

    public final void y() {
        boolean flag1;
        flag1 = tb.b;
        if (i != null && i.k != null) {
            boolean flag = i.k.remove(this);
            if (i.k.size() == 0)
                i.k = null;
        }
        i = null;
        j = null;
        if (k != null) {
            for (int i1 = 0; i1 < k.size(); i1++) {
                fh fh1 = (fh) k.get(i1);
                fh1.i = null;
                if (fh1.j == this)
                    fh1.j = null;
            }
        }
        k = null;
    }

    public static void a(HashSet hashset) {
        Enumeration enumeration = a.elements();
        while (enumeration.hasMoreElements()) {
            fh fh1;
            Iterator iterator;
            fh1 = (fh) enumeration.nextElement();
            if (hashset.contains(fh1.c())) {
                fh1.i = null;
                fh1.j = null;
                fh1.k = null;
                continue;
            }
            if (fh1.i != null && fh1.i.e != null && hashset.contains(fh1.i.e))
                fh1.i = null;
            if (fh1.j != null && fh1.j.e != null && hashset.contains(fh1.j.e))
                fh1.j = null;
            if (fh1.k == null)
                continue;
            iterator = fh1.k.iterator();
            while (iterator.hasNext()) {
                fh fh2 = (fh) iterator.next();
                if (fh2.e != null && hashset.contains(fh2.e))
                    iterator.remove();
            }
            if (fh1.k.size() == 0)
                fh1.k = null;
        }
    }

    final boolean a(ch ch1, Hashtable hashtable, Hashtable hashtable1, Iterator iterator)
            throws tb {
        HashMap hashmap;
        hashmap = null;
        if (ch1.b() != 1 && j != null) {
            Enumeration enumeration;
            hashmap = new HashMap(13);
            enumeration = h();
            while (enumeration.hasMoreElements()) {
                fh fh1 = (fh) enumeration.nextElement();
                String s2 = fh1.d();
                String s3 = (String) hashtable.get(s2);
                if (s3 == null)
                    s3 = s2;
                String s4 = lt.h(s3);
                String s5 = lt.g(s4);
                hashmap.put(fh1, s5);
            }
        }
        String s1 = ch1.a(this, hashmap);
        if (s1 != null) {
            Object obj = hashtable.put(b, s1);
            Object obj1 = hashtable1.put(s1, b);
            lx.c(obj1, z[2] + b + z[1] + s1 + z[1] + obj1 + "'");
            iterator.remove();
            return true;
        } else {
            return false;
        }
    }

    final void a(ch ch1, Hashtable hashtable, Hashtable hashtable1, Hashtable hashtable2) {
        label0:
        {
            String s1 = ch1.b(this);
            if (s1 != null) {
                Object obj = hashtable.put(b, s1);
                Object obj2 = hashtable1.put(s1, b);
                lx.c(obj2, z[2] + b + z[1] + s1 + z[1] + obj2 + "'");
                Object obj3 = hashtable2.put(s1, s1);
                if (!tb.b)
                    break label0;
            }
            Object obj1 = hashtable2.put(b, b);
        }
    }

    final void a(dd dd, re re1, mp mp, ep ep, hp hp, Hashtable hashtable, qy qy1,
                 int i1, Hashtable hashtable1, boolean flag, Hashtable hashtable2) {
        boolean flag1;
        flag1 = tb.b;
        e.a(dd, re1, mp, ep, hp, hashtable, qy1, i1, hashtable1, flag, this, hashtable2);
        if (f != null) {
            int j1;
            int k1;
            j1 = f.size();
            k1 = 0;
            for (; k1 < j1; k1++) {
                fh fh1 = (fh) f.elementAt(k1);
                fh1.a(dd, re1, mp, ep, hp, (Hashtable) hashtable.clone(), (qy) qy1.clone(), i1, (Hashtable) hashtable1.clone(), flag, hashtable2);
            }
        }
    }

    final void a(ch ch1, re re1, Hashtable hashtable, Hashtable hashtable1, Hashtable hashtable2, HashSet hashset)
            throws tb {
        HashMap hashmap;
        boolean flag;
        label0:
        {
            String s2;
            String s4;
            flag = tb.b;
            if (hashtable2.get(e) == null) {
                if (re1 == null || !re1.m(b))
                    break label0;
                String s1 = re1.f(b);
                s2 = ch1.b(b);
                if (s1 != null) {
                    s4 = ch.c(s1);
                    s4 = ch.c(b);
                    String s5 = s2 + s4;
                    if (!b.equals(s5)) {
                        Object obj2 = hashtable.put(b, s5);
                        Object obj3 = hashtable1.put(s5, b);
                        lx.c(obj3, z[2] + b + z[1] + s5 + z[1] + obj3 + "'");
                    }
                }
            }
            hashmap = null;
            if (ch1.b() != 1 && j != null) {
                Enumeration enumeration;
                hashmap = new HashMap(13);
                enumeration = h();
                while (enumeration.hasMoreElements()) {
                    fh fh1 = (fh) enumeration.nextElement();
                    String s6 = fh1.d();
                    String s7 = (String) hashtable.get(s6);
                    if (s7 == null)
                        s7 = s6;
                    String s8 = lt.h(s7);
                    String s9 = lt.g(s8);
                    hashmap.put(fh1, s9);
                }
            }
            String s3 = ch1.a(this, hashmap);
            if (s3 != null) {
                if (!b.equals(s3)) {
                    Object obj = hashtable.put(b, s3);
                    Object obj1 = hashtable1.put(s3, b);
                    lx.c(obj1, z[2] + b + z[1] + s3 + z[1] + obj1 + "'");
                    hashset.add(this);
                }
            }
        }

        if (f != null) {
            for (int i = 0; i < f.size(); i++) {
                fh fh2 = (fh) f.elementAt(i);
                fh2.a(ch1, re1, hashtable, hashtable1, hashtable2, hashset);
            }
        }
    }

    final void a(mp mp) {
        e.a(this, mp);
        if (f != null) {
            for (int j1 = 0; j1 < f.size(); j1++) {
                fh fh1 = (fh) f.elementAt(j1);
                fh1.a(mp);
            }
        }
    }

    private void z() {
        d = null;
        if (e != null) {
            e.b(this);
            e = null;
        }
        f = null;
        g = null;
        h = null;
        i = null;
        j = null;
        k = null;
    }

    static synchronized void A() {
        a = new Hashtable();
    }

    final void a(mt mt1) {
        e = mt1;
    }

    final void e(fh fh1) {
        i = fh1;
    }

    final void f(fh fh1) {
        j = fh1;
    }

    final void a(int i1) {
        c = i1;
    }

    final void g(fh fh1) {
        d = fh1;
    }

    public final void a(gs gs, Object obj, Object obj1, Object obj2) {
        if ((obj instanceof sx) && ((sx) obj).b() == 0 && (obj1 instanceof mt))
            b = e.j();
    }

    final void b(mp mp) {
        e.b(this, mp);
        if (f != null) {
            for (int j1 = 0; j1 < f.size(); j1++) {
                fh fh1 = (fh) f.elementAt(j1);
                fh1.b(mp);
            }
        }
    }

    public final void a(sx sx1, sx sx2, vy vy1, vy vy2) {
        int i1;
        int j1;
        i1 = vy1.a(e);
        j1 = vy2.a(e);
        if (f != null) {
            for (int k1 = 0; k1 < f.size(); k1++) {
                fh fh1 = (fh) f.elementAt(k1);
                sx sx3 = new sx(0);
                sx sx4 = new sx(0);
                fh1.a(sx3, sx4, vy1, vy2);
                i1 += sx3.b();
                j1 += sx4.b();
            }
        }
        sx1.a(i1);
        sx2.a(j1);
        vy1.a(e, i1);
        vy2.a(e, j1);
    }

    private static String z(char[] chs) {
        byte key = 0;
        for (int i = 0; i < chs.length; i++) {
            switch (i % 5) {
                case 0:
                    key = 0xc;
                    break;
                case 1:
                    key = 93;
                    break;
                case 2:
                    key = 122;
                    break;
                case 3:
                    key = 73;
                    break;
                case 4:
                    key = 8;
                    break;
            }
            chs[i] ^= key;
        }
        return new String(chs).intern();
    }

    static {
        String as[];
        as = new String[3];
        as[0] = z("@2\0259(6}]".toCharArray());
        as[1] = z("+}]".toCharArray());
        as[2] = z("H(\n%ao<\016,(o1\033:{,z".toCharArray());
        z = as;
        a = new Hashtable();
    }
}